package cn.wolfcode.luowowo.acticle.query;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

/**
 * 游记查询条件
 */
@Getter
@Setter
@NoArgsConstructor
public class TravelCondition {  //游记查询条件
    private int min;
    private int max;
    public TravelCondition(int min, int max) {
        this.min = min;
        this.max = max;
    }
    public static final Map<Integer, TravelCondition> TRAVEL_TIME; //旅游时间
    public static final Map<Integer, TravelCondition> TRAVEL_DAYS; //旅游天数
    public static final Map<Integer, TravelCondition> TRAVEL_PEREXPEND; //旅游天数
    static{
        TRAVEL_TIME = new HashMap<>();
        TRAVEL_TIME.put(-1, new TravelCondition(1, 12));
        TRAVEL_TIME.put(1, new TravelCondition(1, 2));
        TRAVEL_TIME.put(2, new TravelCondition(3, 4));
        TRAVEL_TIME.put(3, new TravelCondition(5, 6));
        TRAVEL_TIME.put(4, new TravelCondition(7, 8));
        TRAVEL_TIME.put(5, new TravelCondition(9, 10));
        TRAVEL_TIME.put(6, new TravelCondition(11, 12));

        TRAVEL_DAYS = new HashMap<>();
        TRAVEL_DAYS.put(-1, new TravelCondition(-1, Integer.MAX_VALUE));
        TRAVEL_DAYS.put(1, new TravelCondition(-1, 3));
        TRAVEL_DAYS.put(2, new TravelCondition(4, 7));
        TRAVEL_DAYS.put(3, new TravelCondition(8, 14));
        TRAVEL_DAYS.put(4, new TravelCondition(15, Integer.MAX_VALUE));

        TRAVEL_PEREXPEND = new HashMap<>();
        TRAVEL_PEREXPEND.put(-1, new TravelCondition(-1, Integer.MAX_VALUE));
        TRAVEL_PEREXPEND.put(1, new TravelCondition(1, 999));
        TRAVEL_PEREXPEND.put(2, new TravelCondition(1000, 6000));
        TRAVEL_PEREXPEND.put(3, new TravelCondition(6001, 20000));
        TRAVEL_PEREXPEND.put(4, new TravelCondition(20001, Integer.MAX_VALUE));
    }
}
